home *** CD-ROM | disk | FTP | other *** search
/ Teach Your Children: Road Construction Ahead / Teach Your Children: Road Construction Ahead.iso / pc / rca / road.dxr / 00034_Music Parent.ls < prev    next >
Encoding:
Text File  |  1996-07-17  |  609 b   |  23 lines

  1. property currentSectionObject, listOfSounds, soundCounter, howManySounds, pathString
  2.  
  3. on birth me, sectionObject, soundList, musicPath
  4.   set currentSectionObject to sectionObject
  5.   set listOfSounds to soundList
  6.   set howManySounds to count(listOfSounds)
  7.   set soundCounter to 0
  8.   set pathString to musicPath
  9.   return me
  10. end
  11.  
  12. on update me
  13.   if not soundBusy(1) then
  14.     set soundCounter to soundCounter + 1
  15.     if soundCounter > howManySounds then
  16.       stopSound(currentSectionObject)
  17.     else
  18.       sound playFile 1, pathString & getAt(listOfSounds, soundCounter)
  19.       updateStage()
  20.     end if
  21.   end if
  22. end
  23.